
<!--
   弹窗组件，基于mintUI的messageBox

   参数：

   message - 弹窗上的文案
-->
<template>
    <div></div>
</template>
<script>

import './messageBox.less';
import { MessageBox } from 'mint-ui';

export default {
    name: 'messageBox',
    props:[

        "messageParam",

        // "message", 
        // "confirmButtonText", 
        // "showCancelButton",
        // "confirmButtonText",
        // "cancelButtonText",
    ],
    // props: ["customerId","customerName","scheduleType","custSource","money","businessId","scheduleTime"],
    data() {
        return {
            // isSaveClick: true,
        }

    },
    methods: {

        //打开弹窗
        open(obj) {

            MessageBox.confirm('', {
                
                message: obj.message || '',
                title: '提示',
                showConfirmButton: obj.showConfirmButton || true,
                showCancelButton: obj.showCancelButton || false, 
                confirmButtonText: obj.confirmButtonText || '确认',
                cancelButtonText: obj.cancelButtonText || '取消',

            }).then(action => {
                if (action == 'confirm') {     //确认的回调
                    console.log(1);
                    
                }
            }).catch(err => {
                if (err == 'cancel') {     //取消的回调
                    console.log(2);
                }
            });
        },

    }
}
</script>

